#ifndef OBJECT_H_
#define OBJECT_H_

#include<stdio.h>
#include<stdlib.h>

//  前向声明
struct Object;

/*
    接口：
    1. 构造函数
    2. 析构函数
    3. ToString
    4. GetType
*/

//  虚函数表
typedef struct ObjectVTable{
    void (*Destroy)(struct Object* self);
    const char* (*ToString)(struct Object* self);
    const char* (*GetType)(struct Object* self);
} ObjectVTable;

//  基类 Object
typedef struct Object{
    const ObjectVTable* vtbl;
} Object;


//  提前声明接口函数
//  构造函数声明
Object* Object_Create(void);
void Object_Destroy(Object* self);
const char* Object_ToString(Object* self);
const char* Object_GetType(Object* self);


#endif